package com.tuanzi.loan.web.lazy.settlementsystem;

import com.tuanzi.loan.business.service.settlementsystem.SettlementIncomeService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlementsystem.SettlementIncomeRequest;
import com.tuanzi.loan.vo.response.settlementsystem.SettlementIncomeResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-08-20 14:07
 */
public class SettlementIncomeLazyDataModel extends BaseLazyDataModel<SettlementIncomeRequest,SettlementIncomeResponse> {
    private SettlementIncomeService settlementIncomeService = SpringContextHolder.getBean(SettlementIncomeService.class);
    public SettlementIncomeLazyDataModel(SettlementIncomeRequest settlementIncomeRequest) {
        super(settlementIncomeRequest);
    }
    @Override
    protected Page<SettlementIncomeResponse> doLoad(PageSearcher<SettlementIncomeRequest> pageSearcher) {
        return settlementIncomeService.list(pageSearcher);
    }
}